#ifndef COMPUTE_OPERATION_NODE_H
#define COMPUTE_OPERATION_NODE_H

#include "OperationNode.h"
#include "SharedArray.h"

class ExpressionNode;

// Computes arithmetic expressions. It takes ownership of source and expressions.
class ComputeOperationNode: public OperationNode {
	public:
		// Takes source of data and list of expressions (their roots).
		// Takes ownership of the source.
		ComputeOperationNode(OperationNode* source, SharedArray<ExpressionNode*> expressionRoots);
		~ComputeOperationNode();

		// Pulls data from source and returns computed expressions.
		virtual SharedArray<Column> pull();

	private:
		OperationNode* _source;
		SharedArray<ExpressionNode*> _expressionRoots;
};

#endif
